<?php

$quest = array(
	'create_quest'	=>new $pattern ($self, array(
		'(:base_url)/(:community_url)/(:tdi_url)/(:doctype_url)/(:path)$',
		'module' => 'Quest',
		'action' => 'CreateQuest',
		'tdi_url' => '[a-zA-Z-][-a-zA-Z0-9_]*',
		'doctype_url' => 'quest',
		'path' => 'createitem',
	  )),

	new $pattern ($self, array(
		'(:base_url)/(:community_url)/(:tdi_url)/(:doctype_url)/(:path)/ajax$',
		'module' => 'Quest',
		'action' => 'CreateQuest',
		'tdi_url' => '[a-zA-Z-][-a-zA-Z0-9_]*',
		'doctype_url' => 'quest',
		'path' => 'createitem',
	  'ajax'	=> 1
	  )),

	new $pattern ($self, array(
		'(:base_url)/(:community_url)/(:doctype_url)/(:path)$',
		'module' => 'Quest',
		'action' => 'CreateQuest',
		'doctype_url' => 'quest',
		'path' => 'createitem',
	  )),
	new $pattern ($self, array(
		'(:base_url)/(:community_url)/(:doctype_url)/(:path)/ajax$',
		'module' => 'Quest',
		'action' => 'CreateQuest',
		'doctype_url' => 'quest',
		'path' => 'createitem',
	  'ajax'	=> 1
	  )),

	'edit_quest'	=>new $pattern ($self, array(
	  '(:base_url)/(:community_url)/(:path)/(:quest_id)/?(:quest_step)?$',
	  'module'   => 'Quest', 'action' => 'CreateQuest',
	  'path' => 'editquest',
	  'quest_id' => '[0-9]+',
	  'quest_step' => '[0-9]+',
	)),
	new $pattern ($self, array(
	  '(:base_url)/(:community_url)/(:path)/(:quest_id)/(:quest_step)/ajax$',
	  'module'   => 'Quest', 'action' => 'CreateQuest',
	  'path' => 'editquest',
	  'quest_id' => '[0-9]+',
	  'quest_step' => '[0-9]+',
	  'ajax'	=> 1
	)),

	'show_quest' => new $pattern($self, array(
		'(:base_url)/(:community_url)/(:path)/(:id_quest)/?$',
		'module'   => 'Quest',
		'action' => 'ShowQuest',
		'path' => 'showquest',
		'id_quest' => '[0-9]+',
	)),

	'quest_doc_action'	=>new $pattern ($self, array(
	  '(:base_url)/(:community_url)/(:item_id)/(:path)/(:quest_id)/ajax$',
	  'module'   => 'Quest', 'action' => 'DocAction',
	  'path'	=> 'quest',
	  'item_id' => '[0-9]+',
	  'quest_id' => '[0-9]+',
	  'is_ajax'	=> 1,
	)),

	'admin_quest'	=>new $pattern ($self, array(
	  '(:base_url)/(:community_url)/(:path)/(:quest_id)/?$',
	  'module'   => 'Quest', 'action' => 'AdminQuest',
	  'path'	=> 'adminquest',
	  'quest_id' => '[0-9]+',
	)),
);
